package com.ay.smartpark.sdk.common.exception;

public enum CommonEnum implements BaseErrorInfoInterface {

    // 数据操作错误定义
    SUCCESS("200", "成功!"),
    BODY_NOT_MATCH("400","请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401","请求的数字签名不匹配!"),
    NOT_FOUND("404", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    INTERNAL_NULLPOINTER_ERROR("501", "服务器发生空指针异常!"),
    SERVER_BUSY("503","服务器正忙，请稍后再试!"),


    /***用户自定义*****/
    USER_NOT_LOGIN("1001","用户未登录或登陆已过期，请重新登陆。"),
    USER_PASSWORD_ERROR("1002","用户名或密码错误！"),
    USER_PASSWORD_ISNULL("1003","用户名或密码为空！"),
    IMAGE_CODE_ERROR("1004","验证码错误，请重新输入！")
    ;
    

    /** 错误码 */
    private String code;

    /** 错误描述 */
    private String message;

    CommonEnum(String resultCode, String resultMsg) {
        this.code = resultCode;
        this.message = resultMsg;
    }


    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
